package org.jsola.hr.dto.excel;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import static org.jsola.hr.example.ChannelExample.*;

/**
 * 【渠道信息】excel导入对象
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(description = "【渠道信息】excel导入对象")
public class ChannelInfoImportDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ExcelProperty(value = "所属分组")
    private String groupName;

    @ApiModelProperty(notes = N_NAME, example = E_NAME)
    @Length(max = 32, message = M_NAME_MAX)
    @ExcelProperty(value = "渠道名称")
    private String name;

    @ApiModelProperty(notes = N_PHONE, example = E_PHONE)
    @Length(max = 20, message = M_PHONE_MAX)
    @ExcelProperty(value = "联系电话")
    private String phone;

    @ExcelProperty(value = "所在地区")
    private String address;

    @ApiModelProperty(notes = N_IDCARD, example = E_IDCARD)
    @Length(max = 18, message = M_IDCARD_MAX)
    @ExcelProperty(value = "身份证号")
    private String idcard;

    @ApiModelProperty(notes = N_BANK_NO, example = E_BANK_NO)
    @Length(max = 20, message = M_BANK_NO_MAX)
    @ExcelProperty(value = "银行卡号")
    private String bankNo;

    /**
     * 错误原因
     */
    @ExcelIgnore
    private String errorReason;

    /**
     * 错误字段
     */
    @ExcelIgnore
    private String errorField;

}

